package com.frank.oj.service.entity.msg.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.frank.model.entity.msg.AdminSysNotice;
import com.frank.oj.common.result.CommonResult;
import com.frank.oj.mapper.AdminSysNoticeMapper;
import com.frank.oj.model.vo.AdminSysNoticeVO;
import com.frank.oj.service.entity.msg.AdminSysNoticeEntityService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author frank
 * @Date 2024/1/25
 */
@Service
public class AdminSysNoticeEntityServiceImpl extends ServiceImpl<AdminSysNoticeMapper, AdminSysNotice> implements AdminSysNoticeEntityService {
    @Resource
    private AdminSysNoticeMapper adminSysNoticeMapper;
    @Override
    public IPage<AdminSysNoticeVO> getSysNotice(Integer limit, Integer currentPage, String type) {

        Page<AdminSysNoticeVO> page = new Page<>(currentPage,limit);
        return adminSysNoticeMapper.getAdminSysNotice(page,type);
    }
}
